//
//  WDHeader.h
//  WDPolymerizeSDK
//
//  Created by little People on 2023/5/30.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AdjustSdk/AdjustSdk.h>
NS_ASSUME_NONNULL_BEGIN
typedef enum WCardAdSize {
    SIZE640X360,
    SIZE300X250
} WCardAdSize;
@interface WDHeader : NSObject

@property(nonatomic,assign)BOOL isWebview;

+ (instancetype)shareHeader;
//日志开关。YES开，NO关
- (void)WDLogEnable:(BOOL)flag;
//初始化和加载广告
- (void)WDStartAdmob;
//展示splash ad，remove:代表是否已经移除了，YES代表移除了，不展示
- (void)WDShowSplashAdWithHasRemove:(BOOL)remove;
//去除splash ad
- (void)WDRemoveAd;
//获取去除广告状态，1:代表去除广告
- (NSString *)WDGetRemoveAdStats;
//展示native ad
- (void)WDShowNativeAd;
//展示RewardedVideo
- (void)WDShowRewardedVideo;
//展示Interstitial
- (void)WDShowInterstitial;
//展示Banner
- (void)WDShowBanner;
//关闭Banner
- (void)WDCloseBanner;
/*展示card
 WCardAdSize:尺寸 SIZE640X360() SIZE300X250()
 leftMargin:左边距，默认0
 topMargin:顶部边距，默认0
 rightMargin:右边距，默认0
 bottomMargin:底部边距，默认0
 */
- (void)WDShowCardWithSize:(WCardAdSize)WCardAdSize leftMargin:(int)leftMargin topMargin:(int)topMargin rightMargin:(int)rightMargin bottomMargin:(int)bottomMargin;
//隐藏card
- (void)WDHideCard;
//显示广告测试面板
- (void)WDShowTestAD;
//系统分享 title:分享标题 url:分享链接
- (void)WDSysShareWithTitle:(NSString *)title url:(NSString *)url;
//系统的app评分
- (void)WDSysScore;
//震动 repeat是否重复
- (void)WDSysVibrate:(BOOL)repeat;
//取消震动
- (void)WDSysCancelVibrate;
//自定义广告
- (void)WDShowCustom;
//屏幕旋转相关
- (UIInterfaceOrientationMask)WDDeviceSupportedInterfaceOrientationsForWindow:(UIWindow *)window;
//fb登录
- (void)WDFBLogin;
//fb登出
- (void)WDFBLogout;
//fb分享
- (void)WDFBShareWithTitle:(NSString *)title url:(NSString *)url content:(NSString *)shareContent;

- (void)WDApplication:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;

- (void)WDApplication:(UIApplication *)application
            openURL:(NSURL *)url
                options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options;
//adjust配置，handler回调
- (void)WDAdjustCallBackHandler:(void (^)(BOOL isSuccess))handler;
//获取AdjustCampaign
- (NSString *)WDGetAdjustCampaign;
//获取AdjustCreative
- (NSString *)WDGetAdjustCreative;
//adjust事件
- (void)WDAdjustEvent:(NSString *)eventString;

//设置用户属性 json:json可为json字符串或者字典
- (void)WDTrackUserProperty:(id)json;

/**
 自定义事件埋点

 @param key         事件名称
 @param jsonStr 事件属性，json字符串
 */
- (void)WDThinkingTrackEventWithKey:(NSString *)key jsonStr:(NSString *)jsonStr;
- (void)WDThinkingSetSuperPropertiesJsonStr:(NSString *)jsonStr;
//th游戏通用关卡埋点
- (void)WDThinkingTrackLevelEnter:(NSInteger)level;
- (void)WDThinkingTrackLevelStart:(NSInteger)level;
- (void)WDThinkingTrackLevelWin:(NSInteger)level;
- (void)WDThinkingTrackLevelFail:(NSInteger)level;
- (void)WDThinkingTrackLevelRevive:(NSInteger)level;
- (void)WDThinkingTrackLevelRetry:(NSInteger)level;
- (void)WDThinkingTrackLevelProp:(NSInteger)level;

//firebase获取推送token
- (void)WDRequestFCMToken;
- (void)WDFirebaseApnsToken:(NSDate *)token;

//开始内购 productId：商品ID
- (void)WDLaunchInAppPurchase:(NSString *)productId;
//恢复内购 productId：商品ID
- (void)WDRestoreInAppPurchase:(NSString *)productId;
//请求内购列表
- (void)WDRequestProductLists;
//获取uuid
- (NSString *)WDGetUUID;
//banner方向，topDir--YES为顶部，NO为底部，需在调用WDShowBanner之前调用
- (void)WDBannerDirectionWithTop:(BOOL)topDir;
//获取BMS在线参数
- (NSDictionary *)WDGetBMSContent;

//核销
- (void)acknowledgeInAppPurchaseWithoOriginal_transaction_id:(NSString *)original_transaction_id
                                  success:(void (^)(id responseObject))success
                                  failure:(nonnull void (^)(NSError * error))failure;

//未核销
- (void)fetchUnacknowledgedOrdersWithSuccess:(void(^)(id responseObject))success
                                     failure:(void(^)(NSError *error))failure;


/// 从 BMS 下发震动强度1-5
-(void)sysVibrateLevel;

@end

NS_ASSUME_NONNULL_END
